import request from '@/config/axios'

export interface LeaveMessageVO {
        id: number
        customerName: string
        customerMobile: string
        message: string
        serviceToken: string
        dealStatus: number
        dealResult: string
}

// 查询客户留言列表
export const getLeaveMessagePage = async (params) => {
    return await request.get({url: `/service/leave-message/page`, params})
}

// 查询客户留言详情
export const getLeaveMessage = async (id: number) => {
    return await request.get({url: `/service/leave-message/get?id=` + id})
}

// 新增客户留言
export const createLeaveMessage = async (data: LeaveMessageVO) => {
    return await request.post({url: `/service/leave-message/create`, data})
}

// 修改客户留言
export const updateLeaveMessage = async (data: LeaveMessageVO) => {
    return await request.put({url: `/service/leave-message/update`, data})
}

// 删除客户留言
export const deleteLeaveMessage = async (id: number) => {
    return await request.delete({url: `/service/leave-message/delete?id=` + id})
}

// 导出客户留言 Excel
export const exportLeaveMessage = async (params) => {
    return await request.download({url: `/service/leave-message/export-excel`, params})
}